﻿package com.pandemicode.framework.controls {
	import flash.text.AntiAliasType;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	
	/**
	* @author Michael Lawrence
	* @version 1.0.0
	*/
	public class DefaultTextField extends TextField {
		/**
		 * A simple text field wrapper that eases setting up a few of the properties that a textfield has.
		 * @param	fontSize	The font size of the text.
		 * @param	color		The color of the text.
		 * @param	font		The font name of the text.
		 * @param	embedFonts	Whether to embed the font or not.
		 * @param	selectable	Whether the text is selectable.
		 * @param	autoSize	How to automatically size the text field.
		 */
		public function DefaultTextField(fontSize:Number = 30, color:uint = 0xffffff, font:String = "Arial", embedFonts:Boolean = true, selectable:Boolean = false, autoSize:String = TextFieldAutoSize.LEFT) {
			this.autoSize = autoSize;
			this.border = false;
			this.background = false;
			this.antiAliasType = AntiAliasType.ADVANCED;
			this.selectable = selectable;
			this.embedFonts = embedFonts;
			this.defaultTextFormat = new TextFormat(font, fontSize, color, true);
		}
	}
}
